package cn.serenedream.housedecoration.dao;

import cn.serenedream.housedecoration.entity.SaleSaleProducts;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

@Repository
public interface SaleSaleProductsRepository extends JpaRepository<SaleSaleProducts, Long> {
    @Modifying
    @Query(value = "delete from sale_saleproducts where `sale_id` = :id", nativeQuery = true)
    void deleteBySaleId(@Param("id") String id);
}
